	<?php 
	/*Catagory Products*/
	$_helper = $this->helper('catalog/output');
	$allIds = $this->getAllIds();
	$zgbHelper = Mage::helper('zgb');
?>
<div  class="row main">
	<div class="row category-product">
		<?php foreach($allIds as $bId => $cId): ?>
			<?php $products = $this->getCategoryProducts($cId); ?>
				<div class="category-product-item">
					<div class="row category-header">
						<h3>
							<?php echo $this->getCategoryName($cId); ?>
						</h3>
						<a class="more-product" href="<?php echo $this->getCategoryUrl($cId) ?>">更多>></a>
						<!-- SubCatagory -->
						<p>
							<?php foreach($this->getSubcategoryinfo($cId) as $item): ?>
							<a href="<?php echo $item->getUrl() ?>"><?php echo $item->getName() ?></a>&nbsp;|&nbsp;
							<?php endforeach; ?>
						</p>
					</div>
					<div class="row category-content">
						<div class="category-content-left">
							<div class="category-ad">
								<ul class="slides">
								<?php foreach($this->getHomepagebanners($bId) as $banners): ?>
									<li>
										<a href="<?php echo $banners['click_url']?>" target="_blank" onclick="bannerClicks('22','4')" style="display:block"><img alt="" src="<?php echo Mage::helper('bannerslider')->getBannerImage($banners['image']);?>"></a>
									</li>
								<?php endforeach; ?>
								</ul>
							</div>
							<div class="row category-hot-pinpai">
								<h3>热门品牌</h3>
								<ul class="row">
									<?php foreach($this->getCategoryBrandinfo($cId) as $brands): ?>
									<li>
										<a href="/catalog/category/view/id/<?php echo $cId?>/?brand=<?php echo $brands['brand']?>">
												<img src="<?php echo Mage::getBaseUrl('media') . $brands['src']?>" />
										</a>
									</li>
									<?php endforeach; ?>
								</ul>
							</div>
						</div>

						<!-- Right Product -->
						<div class="category-content-right">
							<ul>
							<?php $i = 0; foreach($products as $_product): ?>
								<li>
									<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
										<div class="product-wrap">
											<div class="product-image">
												<img class="lazy" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(180); ?>" width="180" height="180" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
												<?php if($zgbHelper->hasTag($_product)): ?>
												<div class="product-sale-tag">
													<img src="<?php echo $zgbHelper->getSaleTagUrl($_product, $this->getSkinUrl('images')); ?>" alt="">
												</div>
												<?php endif; ?>
											</div>
											<div class="product-shop">
											<h3><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h3>
												<div class="row">
													 <?php if(number_format($_product->getPrice(),2) <= number_format($_product->getFinalPrice(),2)): ?>
														<span class="col-2 special-price home-page-price-paddingleft">
										                    ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
										                </span>
										            <?php else : ?>
										                <span class="col-2 old-price" >
			                                                ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
										                </span>
										                <span class="col-2 special-price">
										                    ￥&nbsp;<?php echo number_format($_product->getFinalPrice(),2); ?>
										                </span>
										            <?php endif; ?>
												</div>
											</div>
										</div>
									</a>
								</li>
								<?php endforeach; ?>
							</ul>
						</div>
					</div>
				</div>
		<?php endforeach; ?>
	</div>
</div>
